<template>
  <div style="margin: 10px"
    ><el-row :gutter="16">
      <el-col :span="8">
        <div class="statistic-card">
          <el-statistic :value="500">
            <template #title>
              <div style="display: inline-flex; align-items: center">
                全部流量(GB)
                <!-- <el-tooltip
                  effect="dark"
                  content="Number of users who logged into the product in one day"
                  placement="top"
                >
                  <el-icon style="margin-left: 4px" :size="12">
                    <SvgIcon name="goTop" />
                  </el-icon>
                </el-tooltip> -->
              </div>
            </template>
          </el-statistic>
          <div class="statistic-footer">
            <div class="footer-item">
              <span>已使用流量</span>
              <span class="green">
                24%
                <el-icon>
                  <CaretTop />
                </el-icon>
              </span>
            </div>
          </div>
        </div>
      </el-col>
      <el-col :span="8">
        <div class="statistic-card">
          <el-statistic :value="20">
            <template #title>
              <div style="display: inline-flex; align-items: center">
                已使用流量(GB)
                <el-tooltip
                  effect="dark"
                  content="Number of users who logged into the product in one month"
                  placement="top"
                >
                  <el-icon style="margin-left: 4px" :size="12">
                    <SvgIcon name="goTop" />
                  </el-icon>
                </el-tooltip>
              </div>
            </template>
          </el-statistic>
          <div class="statistic-footer">
            <div class="footer-item">
              <span>month on month</span>
              <span class="red">
                12%
                <el-icon>
                  <SvgIcon name="goTop" />
                </el-icon>
              </span>
            </div>
          </div>
        </div>
      </el-col>
      <el-col :span="8">
        <div class="statistic-card">
          <el-statistic :value="480" title="New transactions today">
            <template #title>
              <div style="display: inline-flex; align-items: center"> 剩余流量(GB) </div>
            </template>
          </el-statistic>
          <div class="statistic-footer">
            <div class="footer-item">
              <span>than yesterday</span>
              <span class="green">
                16%
                <el-icon>
                  <CaretTop />
                </el-icon>
              </span>
            </div>
            <div class="footer-item">
              <el-icon :size="14">
                <SvgIcon name="goTop" />
              </el-icon>
            </div>
          </div>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script lang="ts" setup>
  // import { ArrowRight, CaretBottom, CaretTop, Warning } from '@element-plus/icons-vue';
  import { SvgIcon } from '../../../../components/Icon';

  {
    SvgIcon;
  }
</script>
<style scoped>
  :global(h2#card-usage ~ .example .example-showcase) {
    background-color: var(--el-fill-color) !important;
  }

  .el-statistic {
    --el-statistic-content-font-size: 28px;
  }

  .statistic-card {
    height: 100%;
    padding: 20px;
    border-radius: 4px;
    background-color: var(--el-bg-color-overlay);
  }

  .statistic-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    color: var(--el-text-color-regular);
    font-size: 12px;
  }

  .statistic-footer .footer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .statistic-footer .footer-item span:last-child {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
  }

  .green {
    color: var(--el-color-success);
  }

  .red {
    color: var(--el-color-error);
  }
</style>
